<%@page import="upeu.cepre.business.SedeManager"%>
<%@page import="com.sun.org.apache.bcel.internal.generic.AALOAD"%>
<%@page import="upeu.cepre.business.DetalleperiodosedeManager"%>
<%@page import="upeu.cepre.business.CarreraManager"%>
<%@page import="upeu.cepre.business.AlumnoManager"%>
<%@page import="upeu.cepre.model.Detalleperiodoalumno"%>
<%@page import="java.util.List"%>
<%@page language="java" contentType="text/html" pageEncoding="UTF-8"%>

<link rel="stylesheet" media="all" href="../../css/tabla.css" />
<script type="text/javascript">
    function altRows(id){
        if(document.getElementsByTagName){  
		
            var table = document.getElementById(id);  
            var rows = table.getElementsByTagName("tr"); 
		 
            for(i = 0; i < rows.length; i++){          
                if(i % 2 == 0){
                    rows[i].className = "evenrowcolor";
                }else{
                    rows[i].className = "oddrowcolor";
                }      
            }
        }
    }
    window.onload=function(){
        altRows('alternatecolor');
    }
</script>
<%
    int numberSon = 1;
    List<Detalleperiodoalumno> listDetalleAlumno = (List<Detalleperiodoalumno>) request.getSession().getAttribute("ListAlumno");

    AlumnoManager alumnoManag = new AlumnoManager();
    CarreraManager carreraManag = new CarreraManager();
    DetalleperiodosedeManager detalleperiodosedeManag = new DetalleperiodosedeManager();
    SedeManager sedeManag = new SedeManager();

%>

<table class="altrowstable" id="alternatecolor" align="center" >
    <tr>
        <th colspan="100%">Lista de Alumnos</th>
    </tr>
    <tr >
        <th>#</th>

        <th>idAlumno</th>
        <th>Nota<br>CursosFinal</th>
        <th>Nota<br>ExamenSemanalFinal</th>
        <th>Nota<br>ExamenFinal    </th>
        <th>idCarrera</th>
        <th>idDellate<br>PeriodoSede</th>
        <th>campus</th>

    </tr>
    <%
        for (Detalleperiodoalumno to : listDetalleAlumno) {
    %>
    <tr>
        <td><%=numberSon++%></td>
        <td><%= alumnoManag.FindId(to.getIdAlumno()).getNombre()%> <%= alumnoManag.FindId(to.getIdAlumno()).getApellidoPaterno()%> <%= alumnoManag.FindId(to.getIdAlumno()).getApellidoMaterno()%></td>
        <td><%=to.getNotaCursosFinal()%></td>
        <td><%=to.getNotaExamenSemanalFinal()%></td>
        <td><%=to.getNotaExamenFinal()%></td>
        <td><%=carreraManag.FindId(to.getIdCarrera()).getNombre()%></td>
        <td><%=sedeManag.FindId(detalleperiodosedeManag.FindId(to.getIdDellatePeriodoSede()).getIdSede()).getNombre()%></td>
        <td><%=to.getCampus()%></td>
    </tr>
    <%}%>
</table>





